# main_launch.launch.py
from launch import LaunchDescription
from launch.actions import IncludeLaunchDescription
from launch.launch_description_sources import PythonLaunchDescriptionSource
from launch_ros.actions import Node
import os
from ament_index_python.packages import get_package_share_directory

def generate_launch_description():
    # 获取其他启动文件的路径
    package_name = 'cpp_co_location_client'  # 替换为你的包名
    launch_file_1 = os.path.join(get_package_share_directory(package_name), 'launch', 'cpp_co_location_client_launch.py')
    launch_file_2 = os.path.join(get_package_share_directory(package_name), 'launch', 'xietongdingwei_launch.py')

    # 包含其他启动文件
    launch_1 = IncludeLaunchDescription(
        PythonLaunchDescriptionSource(launch_file_1)
    )

    launch_2 = IncludeLaunchDescription(
        PythonLaunchDescriptionSource(launch_file_2)
    )

  

    # 创建主启动描述
    return LaunchDescription([
        launch_1,
        launch_2
    ])
